﻿<UserControl x:Class="DIST.LR.ZHJG.Controls.Chart.ucLine"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" 
    xmlns:telerikQuickStart="clr-namespace:Telerik.Windows.Controls.QuickStart;assembly=Telerik.Windows.Controls"
    xmlns:chart="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Charting"
    xmlns:charting="clr-namespace:Telerik.Windows.Controls.Charting;assembly=Telerik.Windows.Controls.Charting">
    <UserControl.Resources>
        <SolidColorBrush x:Key="FirstColor" Color="#FF8EBC00" />
        <SolidColorBrush x:Key="SecondColor" Color="#FF25A0DA" />
        <SolidColorBrush x:Key="ThirdColor" Color="#FFFF6900" />

        <Style x:Key="AxisLineStyle" TargetType="Line">
            <Setter Property="Stroke"  Value="{StaticResource FirstColor}" />
        </Style>
        <Style x:Key="MajorTickLineStyle" TargetType="Line">
            <Setter Property="Stroke"  Value="{StaticResource FirstColor}"  />
        </Style>
        <Style x:Key="MinorTickLineStyle" TargetType="Line">
            <Setter Property="Stroke" Value="{StaticResource FirstColor}" />
        </Style>
        <Style x:Key="CustomLabel" TargetType="TextBlock">
            <Setter Property="Foreground" Value="{StaticResource FirstColor}" />
        </Style>
        <Style x:Key="AxisLineStyle2" TargetType="Line">
            <Setter Property="Stroke" Value="{StaticResource SecondColor}" />
        </Style>
        <Style x:Key="MajorTickLineStyle2" TargetType="Line">
            <Setter Property="Stroke" Value="{StaticResource SecondColor}" />
        </Style>
        <Style x:Key="MinorTickLineStyle2" TargetType="Line">
            <Setter Property="Stroke" Value="{StaticResource SecondColor}" />
        </Style>
        <Style x:Key="CustomLabel2" TargetType="TextBlock">
            <Setter Property="Foreground" Value="{StaticResource SecondColor}" />
        </Style>
        <Style x:Key="AxisLineStyle3" TargetType="Line">
            <Setter Property="Stroke" Value="{StaticResource ThirdColor}" />
        </Style>
        <Style x:Key="MajorTickLineStyle3" TargetType="Line">
            <Setter Property="Stroke" Value="{StaticResource ThirdColor}" />
        </Style>
        <Style x:Key="MinorTickLineStyle3" TargetType="Line">
            <Setter Property="Stroke" Value="{StaticResource ThirdColor}" />
        </Style>
        <Style x:Key="CustomLabel3" TargetType="TextBlock">
            <Setter Property="Foreground" Value="{StaticResource ThirdColor}" />
        </Style>

        <Style x:Key="CustomLegendItem" TargetType="charting:ChartLegendItem">
            <Setter Property="Width" Value="100" />
            <Setter Property="Template" >
                <Setter.Value>
                    <ControlTemplate TargetType="charting:ChartLegendItem">
                        <Grid x:Name="PART_MainContainer" Background="{TemplateBinding Background}"
                        HorizontalAlignment="Stretch" VerticalAlignment="Top">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition />
                            </Grid.ColumnDefinitions>
                            <Path x:Name="PART_LegendItemMarker" 
                                  Width="16"
                                  Height="16"
                                  Margin="{TemplateBinding Margin}"
                                  StrokeThickness="{TemplateBinding MarkerStrokeThickness}"
                                  Style="{TemplateBinding ItemStyle}"
                                  Stretch="Fill"
                                  VerticalAlignment="Center">
                                <Path.Data>
                                    <PathGeometry x:Name="PART_ItemMarkerGeometry" />
                                </Path.Data>
                            </Path>
                            <TextBlock x:Name="PART_TextBlock"
                                       Grid.Column="1"
                                       Padding="{TemplateBinding Padding}"
                                       Margin="{TemplateBinding Margin}"
                                       Foreground="{TemplateBinding Foreground}"
                                       Text="{TemplateBinding Label}"
                                       TextWrapping="Wrap" />
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>
    <Grid>
        <chart:RadChart x:Name="RadChart1">
            <chart:RadChart.SeriesMappings>
            </chart:RadChart.SeriesMappings>
            <chart:RadChart.DefaultView>
                <charting:ChartDefaultView>
                    <!--<charting:ChartDefaultView.ChartArea>
                        <charting:ChartArea LegendName="legend">
                            <charting:ChartArea.AxisY>
                                <charting:AxisY Title="面积" AxisName="Frist" AutoRange="False" MinValue="0" MaxValue="500" Step="100">
                                    <charting:AxisY.AxisStyles>
                                        <charting:AxisStyles AxisLineStyle="{StaticResource AxisLineStyle}"
                                                                TickLineStyle="{StaticResource MajorTickLineStyle}"
                                                                MinorTickLineStyle="{StaticResource MinorTickLineStyle}"
                                                                ItemLabelStyle="{StaticResource CustomLabel}"/>
                                    </charting:AxisY.AxisStyles>
                                </charting:AxisY>
                            </charting:ChartArea.AxisY>                       
                        </charting:ChartArea>
                    </charting:ChartDefaultView.ChartArea>-->
                    <charting:ChartDefaultView.ChartLegend>
                        <charting:ChartLegend x:Name="legend" Header="图例"  BorderThickness="0" Background="White" LegendItemStyle="{StaticResource CustomLegendItem}"  />
                    </charting:ChartDefaultView.ChartLegend>
                </charting:ChartDefaultView>
            </chart:RadChart.DefaultView>
        </chart:RadChart>
   
    </Grid>
</UserControl>
